package com.rockwell.sniffyhunter.utils;

import com.rockwell.sniffyhunter.model.ObstacleSkipper;

public enum ObstacleSkipperState implements IStateMachine {
	START {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).start();
		}
	},
	SCAN_BEFORE_ROTATE_TO_MOVE_AWAY {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).scanBeforeRotateToMoveAway();
		}
	},
	ROTATE_TO_MOVE_AWAY {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveAway();
		}
	},
	SCAN_AFTER_ROTATE_TO_MOVE_AWAY {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveAway();
		}
	},
	MOVE_AWAY {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveAway();
		}
	},
	SCAN_AFTER_MOVE_AWAY {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveAway();
		}
	},
	ROTATE_TO_MOVE_FORWARD {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveForward();
		}
	},
	SCAN_AFTER_ROTATE_TO_MOVE_FORWARD {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveForward();
		}
	},
	MOVE_FORWARD {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveForward();
		}
	},
	SCAN_AFTER_MOVE_FORWARD {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveForward();
		}
	},
	ROTATE_TO_MOVE_BACK {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveBack();
		}
	},
	SCAN_AFTER_ROTATE_TO_MOVE_BACK {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).rotateToMoveBack();
		}
	},
	MOVE_BACK {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveBack();
		}
	},
	SCAN_AFTER_MOVE_BACK {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((ObstacleSkipper)stateObject).moveBack();
		}
	},
	DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return START;
		}
	};
}
